#pragma once
#include "afxwin.h"

#include "RealObject/Provider.h"

#include "Currency.h"
// CProductDlg dialog

class CProductDlg : public CDialog
{
	DECLARE_DYNAMIC(CProductDlg)

public:
	CProductDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CProductDlg();

// Dialog Data
	enum { IDD = IDD_D_PRODUCT };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

public:
	CString getCodeStore();
	int		getTypeProduct();
	CString getCodeGroup();
	CString getCodeDistributor(); 

public:
	afx_msg void OnBnClickedButSave();
	

	
public:
	CString m_sCodeStore;
	CString m_sCodeGroup;
	int m_nType;
	CString m_sCodeDistributor;
	CString m_sCode;
	CString m_sName;
	CString m_sOrgin;
	int m_nCount;
	CComboBox m_ctrlProvider;
	CString m_sPriceInput;
	CString m_sPriceSell;
	CString m_sPriceWhole;
	CComboBox m_ctrlCategory;
	CComboBox m_ctrlType;
	CComboBox m_ctrlStore;
	virtual BOOL OnInitDialog();
	
	afx_msg void OnBnClickedButClose();
	CEdit m_ctrlName;
	CListBox m_ctrlList;
	afx_msg void OnSelChange();
	afx_msg void OnEnChangeEName();
	afx_msg void OnLbnDblclkListProduct();
	virtual BOOL PreTranslateMessage(MSG* pMsg);

	void reloadTypeProduct(const int& nType);
	CString m_sCOdeProvider;
	CCurrency m_ctrlSell;
	CCurrency m_ctrlWhole;
	CCurrency m_ctrlInput;
	CString m_sBonus;
	CCurrency m_ctrlBonus;
};
